﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Thank you!</title>
     <link rel="stylesheet" type="text/css" href="style.css"/> 
	  <script type="text/javascript" src="js/jquery.min.js"></script>
     <style>
     #submitButton
     {
         width:500px;
         height:150px;
         font-size:50px;
     }
     </style>
     <script>
      $(document).ready(function () {
            var match,
				pl = /\+/g, // Regex for replacing addition symbol with a space
				search = /([^&=]+)=?([^&]*)/g,
				decode = function (s) {
				    return decodeURIComponent(s.replace(pl, " "));
				},
				query = window.location.search.substring(1);

            var urlParams = {};
            while (match = search.exec(query))
                urlParams[decode(match[1])] = decode(match[2]);
			var assignmentId = 	urlParams["assignmentId"];			
            var gameUrl = urlParams["turkSubmitTo"] + "/mturk/externalSubmit";
			$("#formHIT").attr("action",gameUrl);
			$("#assId").attr("value",assignmentId);
        });
       
     </script>
</head>
<body>
<div style="width:600px;margin:100px auto;font-size:50px;">
<h1>Thank You!</h1>
    <form id="formHIT" name="formHIT" action="" method="post">
    <input type="submit" name="submitButton" id="submitButton" value="Submit HIT" />
    <input id="assId" type="hidden" name="assignmentId" value="" />
   
    </form>


</div>
</body>
</html>
